package com.tamecode.chapter05.part11.sub1;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

@Configuration
public class DaoConfig {

    @Bean
    public UserDao userDao() {
        return new UserDao();
    }

    @Bean
    @Scope(value = "prototype") // 每次都返回的是新的对象
    public LogDao logDao() {
        return new LogDao();
    }
}
